package com.lightsaber.trade.core.service.sysparam;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lightsaber.trade.core.dao.BaseDao;
import com.lightsaber.trade.core.dao.sysparam.SysParameteDao;
import com.lightsaber.trade.core.entity.sysparam.SysParamete;
import com.lightsaber.trade.core.service.BaseServiceImpl;

@Service
@Transactional
public class SysParameteManager extends BaseServiceImpl<SysParamete, String> {

    @Autowired
    private SysParameteDao sysParameteDao;

    @Override
    protected BaseDao<SysParamete, String> getDao() {
        return sysParameteDao;
    }

    public List<SysParamete> findByType(String type) {
        return sysParameteDao.findByType(type);
    }
    
    public SysParamete findByTypeAndCode(String type, String code) {
        return sysParameteDao.findByTypeAndCode(type, code);
    }
}
